import React from 'react'
import { BrowserRouter as Router, Redirect, Route, NavLink, Switch } from 'react-router-dom';
import './my.css'
import book from './image/book.png'
import Bookdetail from './Bookdetail.js'

class Myset extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
			userid: localStorage.getItem("userid"),
			res: []
  	    };
    }
	
    render() {
		//console.log(this.state.res);
		//let list = this.state.res;
		//console.log(list);
		return (
        <div>
			<div className='Mymsgsetnamesig-top'>
				<span className='my-return' onClick={() => this.props.history.goBack()}>&lt;</span>
				<span className='my-setnamesig-top'> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;设置</span>
			</div>
			
			<div className='my-kuang'>
				<span className='my-kuang-lefttxt'>&nbsp;</span>
				<span className='my-kuang-mid-txt'>修改密码</span>
				<span className='my-kuang-right'>&gt;</span>
			</div>
			<button style={{textAlign:'center'}} className='btn-shan' onClick={() => {
				localStorage.removeItem("userid");　　
				this.props.history.push('/Login')
			}}>退出登录</button>
			<div style={{height:'300px'}}></div>,
			
        </div>
    );
  }
}
export default Myset
//<button onClick={this.guan}>id1关注id2</button><br />
// guan = () => {
// 		console.log('guan');
// 		fetch('http://154.8.202.56:8081/user/guan', {
// 			method: 'post',
// 			body: JSON.stringify({'id1':'25','id2':'23'}),
// 			headers: {
// 			    "Access-Control-Allow-Origin":"*",
// 			    'content-type': 'application/json'
// 			},
// 			mode: 'cors'
// 		})
// 		.then(res=>res.json())
// 		.then(res=> {
// 			console.log(res)
// 		})
// 	}